﻿using Catastrophe.BasePC.UI.UIMode;
using Catastrophe.BasePC.UI.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace Catastrophe.BasePC.UI.UI
{
    /// <summary>
    /// WdRoleEdit.xaml 的交互逻辑
    /// </summary>
    public partial class WdRoleEdit : Window
    {
        /// <summary>
        /// 
        /// </summary>
        WdRoleEditModel mode { get; set; }
        private SysUserEntity userEntity;
        public WdRoleEdit(SysUserEntity userEntity)
        {
            InitializeComponent();
            mode = this.DataContext as WdRoleEditModel;
            this.userEntity = userEntity;
            this.Loaded += WdRoleEdit_Loaded;
        }

        private void WdRoleEdit_Loaded(object sender, RoutedEventArgs e)
        {
            mode.UserEntity= userEntity;
            mode.LoadData();
        }

        private void Button_Click(object sender, RoutedEventArgs e)
        {
            this.Close();
        }
    }
}
